Window

A freeform window.

<picture> <source srcset="window-dark.png" media="(prefers-color-scheme: dark)"> <img src="window.png" alt="window"> </picture>

The AdwWindow widget is a subclass of [class@Gtk.Window] which has no titlebar area. It means [class@Gtk.HeaderBar] can be used as follows:

<object class="AdwWindow">
<property name="content">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkHeaderBar"/>
</child>
<child>
<!-- ... -->
</child>
</object>
</property>
</object>

Using [method@Gtk.Window.get_titlebar] and [method@Gtk.Window.set_titlebar] is not supported and will result in a crash.

Constructors

this
this(AdwWindow* adwWindow, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new AdwWindow.

Members

Functions

getAdwWindowStruct
AdwWindow* getAdwWindowStruct(bool transferOwnership)

Get the main Gtk struct

getContent
Widget getContent()

Gets the content widget of @self.

getStruct
void* getStruct()

the main Gtk struct as a void*

setChild
void setChild(Widget child)

You should use setContent(Widget) instead

setContent
void setContent(Widget content)

Sets the content widget of @self.

Static functions

getType
GType getType()

Variables

adwWindow
AdwWindow* adwWindow;

the main Gtk struct

Meta